<%@page import="com.project.util.StringUtil"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%
	String result = (String) request.getAttribute(StringUtil.RESULT);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%@ include file="/WEB-INF/jsp/include/head.jsp"%>
<title>找回密码</title>
<script type="text/javascript">
	$(function() {
		var $submit = $("#submit");
		$submit.click(function(){
			var $form = $("#findForm");
			var id = $("#id").val().trim();
			var psw1 = $("#password").val().trim();
			var psw2 = $("#password2").val().trim();
			//判断用户名、密码是否为空
			if(id == null || id == ""){
				alert("用户id不能为空!"); 
				return;
			}
			if(psw1 == null || psw1 == ""){
				alert("请输入密码!"); 
				return;
			}
			//判断密码是否一致
			if(psw1 != psw2){
				alert("两次密码输入不一致");
				return;
			}
			$form.submit();
		});
		
	});
</script>
</head>
<body>
<div class="container" >
	<%@ include file="/WEB-INF/jsp/include/top.jsp"%>
	<div class="margin_top col-lg-6 col-md-6 col-md-push-3 col-xs-12 col-sm-12">
		<form action="user/findPassword" method="post" id="findForm">
			<table class="table">
				<tr>
					<td>用户名：</td>
					<td><input name="id" id="id" placeholder="用户名"></td>
				</tr>
				<tr>
					<td>密码：</td>
					<td><input type="password" name="password" id="password"
						placeholder="新密码"></td>
				</tr>
				<tr>
					<td>确认密码：</td>
					<td><input type="password" name="" id="password2"
						placeholder="确认密码"></td>
				</tr>
				<tr>
					<td><button type="reset" id="" class="btn reset">重设</button> </td>
					<td><label  id="submit" class="btn submit">确认修改</label> </td>
				</tr>
			</table>
		</form>
	</div>
	<div>
		<%
			if (result == StringUtil.FAILURE) {
		%>
		<b>密码修改失败，请重试！</b>
		<%
			}
		%>
	</div>
	<%@ include file="/WEB-INF/jsp/include/bottom.jsp"%>
	</div>
</body>
</html>